<template>
	<view>
		<!-- 自定义套餐充值组件 -->
		<rechargelist :tv_name="tv_name" :recharge="recharge"></rechargelist>
	</view>
</template>

<script>
	import rechargelist from '@/pages_sub/components/rechargelist.vue';
	export default {
		components: {
			rechargelist
		},
		data() {
			return {
				tv_name: "",
				recharge: [],
			}
		},
		async onLoad(options) {
			if (!vk.vuex.get('$user.userInfo._id')) {
				uni.reLaunch({
					url: "/pages/index/index"
				})
			}
			
			if (options.tv_name) {
				this.tv_name = options.tv_name
			}

			vk.callFunction({
				url: 'client/pay/kh/get_rechargelist',
				title: '请求中...',
				data: {
					appid: vk.vuex.get('$app.appid')
				},
				success: (data) => {
					console.log('11111111111',data);
					this.recharge = data.recharge
				}
			});
		},
		onUnload() {
			
			
		},
		methods: {

		}
	}
</script>

<style>
	page {
		background-color: #eef5fc;
	}
</style>
